<?php
// +----------------------------------------------------------------------
// | ZanPianCMS
// +----------------------------------------------------------------------
// | Copyright (c) 2013 http://www.zanpiancms.com All rights reserved.
// +----------------------------------------------------------------------
// | BBS:  <http://www.zanpiancms.cc>
// +----------------------------------------------------------------------
namespace app\common\model;
use think\Model;
use think\Cache;
class Manage extends Model{	
	//删除缓存
    public function DelCache($sid=1,$id){
        //视频		
        if($sid==1 || $sid=='vod'){
			Cache::clear('foreach_vod');
			if(empty($GLOBALS['config']['cache']['html_cache_on']) && empty($GLOBALS['config']['cache']['data_cache_vod'])){
			    return false;
			}
			$info=db('vod')->join('actor actor','actor.actor_vid =vod_id','LEFT')->join('story story','story.story_vid =vod_id','LEFT')->field('vod_id,vod_cid,vod_letters,story_id,actor_id')->find($id);
			if($info['vod_id']){
				if(!empty($GLOBALS['config']['cache']['html_cache_on'])){
					if(!empty($GLOBALS['config']['cache']['html_cache_index'])){
			            $this->Delindex();
				        if(!empty($GLOBALS['config']['cache']['html_cache_vod_list'])){
			                deldir(RUNTIME_PATH.'html/pc/show/'.getlistpid($info['vod_cid']).'/');
				            deldir(RUNTIME_PATH.'html/pc/show/'.getlistname(getlistpid($info['vod_cid']),'list_dir').'/');
				
			                deldir(RUNTIME_PATH.'html/mobile/show/'.getlistpid($info['vod_cid']).'/');
				            deldir(RUNTIME_PATH.'html/mobile/show/'.getlistname(getlistpid($info['vod_cid']),'list_dir').'/');
                        }
					    if(!empty($GLOBALS['config']['cache']['html_cache_vod_read'])){
				            //删除PC端HTML缓存
			                deldir(RUNTIME_PATH.'html/pc/vod/'.get_Key($info['vod_id']).'/');
				            deldir(RUNTIME_PATH.'html/pc/vod/'.get_Key($info['vod_letters']).'/');
					
			                deldir(RUNTIME_PATH.'html/pc/story/'.get_Key($info['vod_id']).'/');
				            deldir(RUNTIME_PATH.'html/pc/story/'.get_Key($info['vod_letters']).'/');
				            deldir(RUNTIME_PATH.'html/pc/story/'.get_Key($info['story_id']).'/');
			                deldir(RUNTIME_PATH.'html/pc/actor/'.get_Key($info['vod_id']).'/');
			                deldir(RUNTIME_PATH.'html/pc/actor/'.get_Key($info['vod_letters']).'/');
                            deldir(RUNTIME_PATH.'html/pc/actor/'.get_Key($info['actor_id']).'/');
				            //删除手机端HTML缓存
			                deldir(RUNTIME_PATH.'html/mobile/vod/'.get_Key($info['vod_id']).'/');
				            deldir(RUNTIME_PATH.'html/mobile/vod/'.get_Key($info['vod_letters']).'/');
			                deldir(RUNTIME_PATH.'html/mobile/story/'.get_Key($info['vod_id']).'/');
				            deldir(RUNTIME_PATH.'html/mobile/story/'.get_Key($info['vod_letters']).'/');
				            deldir(RUNTIME_PATH.'html/mobile/story/'.get_Key($info['story_id']).'/');
			                deldir(RUNTIME_PATH.'html/mobile/actor/'.get_Key($info['vod_id']).'/');
			                deldir(RUNTIME_PATH.'html/mobile/actor/'.get_Key($info['vod_letters']).'/');
                            deldir(RUNTIME_PATH.'html/mobile/actor/'.get_Key($info['actor_id']).'/');
					    }
				    }
				}
                if(!empty($GLOBALS['config']['cache']['data_cache_vod'])){			
				    //删除内容缓存
                    Cache::rm('data_cache_vod_'.$info['vod_id']);
				    Cache::rm('data_cache_vod_'.$info['vod_letters']);
				
			        Cache::rm('data_cache_story_'.$info['vod_id']);
				    Cache::rm('data_cache_story_'.$info['vod_letters']);
				    Cache::rm('data_cache_story_'.$info['story_id']);
				
				    Cache::rm('data_cache_actor_'.$info['vod_id']);
                    Cache::rm('data_cache_actor_'.$info['vod_letters']);
                    Cache::rm('data_cache_actor_'.$info['actor_id']);
                }			
			}			
		}
		//剧情
        elseif($sid==4 || $sid=='story'){
			Cache::clear('foreach_story');	
			if(empty($GLOBALS['config']['cache']['html_cache_on']) && empty($GLOBALS['config']['cache']['data_cache_story'])){
			    return false;
			}
			$info=db('story')->join('vod vod','vod.vod_id =story_vid','LEFT')->field('vod_id,vod_letters,story_id,story_cid')->find($id);
			if($info['story_id']){
                if(!empty($GLOBALS['config']['cache']['html_cache_on'])){	
                    $this->Delindex();
				    if(!empty($GLOBALS['config']['cache']['html_cache_story_list'])){
			            deldir(RUNTIME_PATH.'html/pc/show/'.getlistpid($info['story_cid']).'/');
				        deldir(RUNTIME_PATH.'html/pc/show/'.getlistname(getlistpid($info['story_cid']),'list_dir').'/');
				
			            deldir(RUNTIME_PATH.'html/mobile/show/'.getlistpid($info['story_cid']).'/');
				        deldir(RUNTIME_PATH.'html/mobile/show/'.getlistname(getlistpid($info['story_cid']),'list_dir').'/');
                    }
                    if(!empty($GLOBALS['config']['cache']['html_cache_story_read'])){				
				       //删除PC端HTML缓存
			            deldir(RUNTIME_PATH.'html/pc/story/'.get_Key($info['vod_id']).'/');
				        deldir(RUNTIME_PATH.'html/pc/story/'.get_Key($info['vod_letters']).'/');
				        deldir(RUNTIME_PATH.'html/pc/story/'.get_Key($info['story_id']).'/');
                        @unlink(RUNTIME_PATH.'html/pc/vod/'.get_Key($info['vod_id']).'/read/index.'.$GLOBALS['config']['rewrite']['url_rewrite_suffix']);
                        @unlink(RUNTIME_PATH.'html/pc/vod/'.get_Key($info['vod_letters']).'/read/index.'.$GLOBALS['config']['rewrite']['url_rewrite_suffix']);					
				        //删除手机端HTML缓存
			            deldir(RUNTIME_PATH.'html/mobile/story/'.get_Key($info['vod_id']).'/');
				        deldir(RUNTIME_PATH.'html/mobile/story/'.get_Key($info['vod_letters']).'/');
				        deldir(RUNTIME_PATH.'html/mobile/story/'.get_Key($info['story_id']).'/');
                        @unlink(RUNTIME_PATH.'html/mobile/vod/'.get_Key($info['vod_id']).'/read/index.'.$GLOBALS['config']['rewrite']['url_rewrite_suffix']);
                        @unlink(RUNTIME_PATH.'html/mobile/vod/'.get_Key($info['vod_letters']).'/read/index.'.$GLOBALS['config']['rewrite']['url_rewrite_suffix']);
                    }				
                }
                if(!empty($GLOBALS['config']['cache']['data_cache_story'])){					
				    //删除内容缓存
                    Cache::rm('data_cache_vod_'.$info['vod_id']);
				    Cache::rm('data_cache_vod_'.$info['vod_letters']);
			        Cache::rm('data_cache_story_'.$info['vod_id']);
				    Cache::rm('data_cache_story_'.$info['vod_letters']);
				    Cache::rm('data_cache_story_'.$info['story_id']);
				}				
			}		
		}
		//剧集
        elseif($sid==12 || $sid=='part'){
			Cache::clear('foreach_part');
			if(empty($GLOBALS['config']['cache']['html_cache_on']) && empty($GLOBALS['config']['cache']['data_cache_story'])){
			    return false;
			}			
			$info=db('part')->join('story story','story.story_vid =part_vid','LEFT')->join('vod vod','vod.vod_id =part_vid','LEFT')->field('vod_id,vod_letters,story_id,story_cid,part_id,part_oid')->find($id);
			if($info['part_id']){
				if(!empty($GLOBALS['config']['cache']['html_cache_on'])){
					//删除分类
				    if(!empty($GLOBALS['config']['cache']['html_cache_story_list'])){	
			            deldir(RUNTIME_PATH.'html/pc/show/'.getlistpid($info['story_cid']).'/');
				        deldir(RUNTIME_PATH.'html/pc/show/'.getlistname(getlistpid($info['story_cid']),'list_dir').'/');
			            deldir(RUNTIME_PATH.'html/mobile/show/'.getlistpid($info['story_cid']).'/');
				        deldir(RUNTIME_PATH.'html/mobile/show/'.getlistname(getlistpid($info['story_cid']),'list_dir').'/');
                    }
                    if(!empty($GLOBALS['config']['cache']['html_cache_story_read'])){				
				        //删除PC端HTML缓存
			            deldir(RUNTIME_PATH.'html/pc/story/'.get_Key($info['vod_id']).'/');
				        deldir(RUNTIME_PATH.'html/pc/story/'.get_Key($info['vod_letters']).'/');
				        deldir(RUNTIME_PATH.'html/pc/story/'.get_Key($info['story_id']).'/');
				        deldir(RUNTIME_PATH.'html/pc/story/'.get_Key($info['part_id']).'/');
                        @unlink(RUNTIME_PATH.'html/pc/vod/'.get_Key($info['vod_id']).'/read/index.'.$GLOBALS['config']['rewrite']['url_rewrite_suffix']);
                        @unlink(RUNTIME_PATH.'html/pc/vod/'.get_Key($info['vod_letters']).'/read/index.'.$GLOBALS['config']['rewrite']['url_rewrite_suffix']);					
				        //删除手机端HTML缓存
			            deldir(RUNTIME_PATH.'html/mobile/story/'.get_Key($info['vod_id']).'/');
				        deldir(RUNTIME_PATH.'html/mobile/story/'.get_Key($info['vod_letters']).'/');
				        deldir(RUNTIME_PATH.'html/mobile/story/'.get_Key($info['story_id']).'/');
				        deldir(RUNTIME_PATH.'html/mobile/story/'.get_Key($info['part_id']).'/');
                        @unlink(RUNTIME_PATH.'html/mobile/vod/'.get_Key($info['vod_id']).'/read/index.'.$GLOBALS['config']['rewrite']['url_rewrite_suffix']);
                        @unlink(RUNTIME_PATH.'html/mobile/vod/'.get_Key($info['vod_letters']).'/read/index.'.$GLOBALS['config']['rewrite']['url_rewrite_suffix']);
				    }
                }
                if(!empty($GLOBALS['config']['cache']['data_cache_story'])){				
				    //删除内容缓存
                    Cache::rm('data_cache_vod_'.$info['vod_id']);
				    Cache::rm('data_cache_vod_'.$info['vod_letters']);
                    Cache::clear('data_part_'.$info['part_id']);
                    Cache::clear('data_part_'.$info['story_id']);
                    Cache::clear('data_part_'.$info['vod_id']);
                    Cache::clear('data_part_'.$info['vod_letters']);					
                }		
			}	
		}
		//演员表
        elseif($sid==6 || $sid=='actor'){
			Cache::clear('foreach_actor');	
			if(empty($GLOBALS['config']['cache']['html_cache_on']) && empty($GLOBALS['config']['cache']['data_cache_actor'])){
			    return false;
			}				
			$info=db('actor')->join('vod vod','vod.vod_id =actor_vid','LEFT')->field('vod_id,vod_letters,actor_id,actor_cid')->find($id);
			if($info['actor_id']){
				if(!empty($GLOBALS['config']['cache']['html_cache_on'])){
			         //删除分类
				    if(!empty($GLOBALS['config']['cache']['html_cache_actor_list'])){
			            deldir(RUNTIME_PATH.'html/pc/show/'.getlistpid($info['actor_cid']).'/');
				        deldir(RUNTIME_PATH.'html/pc/show/'.getlistname(getlistpid($info['actor_cid']),'list_dir').'/');
				
			            deldir(RUNTIME_PATH.'html/mobile/show/'.getlistpid($info['actor_cid']).'/');
				        deldir(RUNTIME_PATH.'html/mobile/show/'.getlistname(getlistpid($info['actor_cid']),'list_dir').'/');
                    }
                    if(!empty($GLOBALS['config']['cache']['html_cache_actor_read'])){				
				        //删除PC端HTML缓存
			            deldir(RUNTIME_PATH.'html/pc/actor/'.get_Key($info['vod_id']).'/');
				        deldir(RUNTIME_PATH.'html/pc/actor/'.get_Key($info['vod_letters']).'/');
				        deldir(RUNTIME_PATH.'html/pc/actor/'.get_Key($info['actor_id']).'/');
                        @unlink(RUNTIME_PATH.'html/pc/vod/'.get_Key($info['vod_id']).'/read/index.'.$GLOBALS['config']['rewrite']['url_rewrite_suffix']);
                        @unlink(RUNTIME_PATH.'html/pc/vod/'.get_Key($info['vod_letters']).'/read/index.'.$GLOBALS['config']['rewrite']['url_rewrite_suffix']);					
				       //删除手机端HTML缓存
			            deldir(RUNTIME_PATH.'html/mobile/actor/'.get_Key($info['vod_id']).'/');
				        deldir(RUNTIME_PATH.'html/mobile/actor/'.get_Key($info['vod_letters']).'/');
				        deldir(RUNTIME_PATH.'html/mobile/actor/'.get_Key($info['actor_id']).'/');
                        @unlink(RUNTIME_PATH.'html/mobile/vod/'.get_Key($info['vod_id']).'/read/index.'.$GLOBALS['config']['rewrite']['url_rewrite_suffix']);
                        @unlink(RUNTIME_PATH.'html/mobile/vod/'.get_Key($info['vod_letters']).'/read/index.'.$GLOBALS['config']['rewrite']['url_rewrite_suffix']);
				    }
                }
                if(!empty($GLOBALS['config']['cache']['data_cache_actor'])){				
				    //删除内容缓存
                    Cache::rm('data_cache_actor_'.$info['vod_id']);
				    Cache::rm('data_cache_actor_'.$info['vod_letters']);
                    Cache::rm('data_cache_actor_'.$info['actor_id']);
				}				
			}	
		}
		//角色
        elseif($sid==5 || $sid=='role'){
			Cache::clear('foreach_role');
			if(empty($GLOBALS['config']['cache']['html_cache_on']) && empty($GLOBALS['config']['cache']['data_cache_role'])){
			    return false;
			}			
			$info=db('role')->join('actor actor','actor.actor_vid =role_vid','LEFT')->join('vod vod','vod.vod_id =role_vid','LEFT')->field('vod_id,vod_letters,actor_id,actor_cid,role_id,role_cid')->find($id);
			if($info['role_id']){
				if(!empty($GLOBALS['config']['cache']['html_cache_on'])){
					 //删除分类
				    if(!empty($GLOBALS['config']['cache']['html_cache_role_list'])){	
			            deldir(RUNTIME_PATH.'html/pc/show/'.getlistpid($info['role_cid']).'/');
				        deldir(RUNTIME_PATH.'html/pc/show/'.getlistname(getlistpid($info['role_cid']),'list_dir').'/');
				
			            deldir(RUNTIME_PATH.'html/mobile/show/'.getlistpid($info['role_cid']).'/');
				        deldir(RUNTIME_PATH.'html/mobile/show/'.getlistname(getlistpid($info['role_cid']),'list_dir').'/');	
                    }
                    if(!empty($GLOBALS['config']['cache']['html_cache_role_read'])){				
				        //删除PC端HTML缓存
			            deldir(RUNTIME_PATH.'html/pc/actor/'.get_Key($info['vod_id']).'/');
				        deldir(RUNTIME_PATH.'html/pc/actor/'.get_Key($info['vod_letters']).'/');
				        deldir(RUNTIME_PATH.'html/pc/actor/'.get_Key($info['actor_id']).'/');
				        deldir(RUNTIME_PATH.'html/pc/actor/'.get_Key($info['role_id']).'/');
                        @unlink(RUNTIME_PATH.'html/pc/vod/'.get_Key($info['vod_id']).'/read/index.'.$GLOBALS['config']['rewrite']['url_rewrite_suffix']);
                        @unlink(RUNTIME_PATH.'html/pc/vod/'.get_Key($info['vod_letters']).'/read/index.'.$GLOBALS['config']['rewrite']['url_rewrite_suffix']);					
				        //删除手机端HTML缓存
			            deldir(RUNTIME_PATH.'html/mobile/actor/'.get_Key($info['vod_id']).'/');
				        deldir(RUNTIME_PATH.'html/mobile/actor/'.get_Key($info['vod_letters']).'/');
				        deldir(RUNTIME_PATH.'html/mobile/actor/'.get_Key($info['actor_id']).'/');
				        deldir(RUNTIME_PATH.'html/mobile/actor/'.get_Key($info['role_id']).'/');
                        @unlink(RUNTIME_PATH.'html/mobile/vod/'.get_Key($info['vod_id']).'/read/index.'.$GLOBALS['config']['rewrite']['url_rewrite_suffix']);
                        @unlink(RUNTIME_PATH.'html/mobile/vod/'.get_Key($info['vod_letters']).'/read/index.'.$GLOBALS['config']['rewrite']['url_rewrite_suffix']);
				    }
                }
                if(!empty($GLOBALS['config']['cache']['data_cache_role'])){				 
				    //删除内容缓存
                     Cache::rm('data_cache_role_'.$info['role_id']);
                }				
			}		
		}
		//文章
        elseif($sid==2 || $sid=='news'){
			Cache::clear('foreach_news');
			if(empty($GLOBALS['config']['cache']['html_cache_on']) && empty($GLOBALS['config']['cache']['data_cache_news'])){
			    return false;
			}			
			$info=db('news')->field('news_id,news_cid')->find($id);
			if($info['news_id']){
				if(!empty($GLOBALS['config']['cache']['html_cache_on'])){
			        $this->Delindex();
				    if(!empty($GLOBALS['config']['cache']['html_cache_news_list'])){
			            deldir(RUNTIME_PATH.'html/pc/show/'.getlistpid($info['news_cid']).'/');
				        deldir(RUNTIME_PATH.'html/pc/show/'.getlistname(getlistpid($info['news_cid']),'list_dir').'/');
				
			            deldir(RUNTIME_PATH.'html/mobile/show/'.getlistpid($info['news_cid']).'/');
				        deldir(RUNTIME_PATH.'html/mobile/show/'.getlistname(getlistpid($info['news_cid']),'list_dir').'/');
                    }	
                    if(!empty($GLOBALS['config']['cache']['html_cache_news_read'])){				
				        //删除PC端HTML缓存
				        deldir(RUNTIME_PATH.'html/pc/news/'.get_Key($info['news_id']).'/');				
				        //删除手机端HTML缓存
			            deldir(RUNTIME_PATH.'html/mobile/news/'.get_Key($info['news_id']).'/');	
				    }
                }
                if(!empty($GLOBALS['config']['cache']['data_cache_news'])){					
				    //删除内容缓存
                    Cache::rm('data_cache_news_'.$info['news_id']);	
                }				
			}	
		}
		//明星
        elseif($sid==3 || $sid=='star'){
			Cache::clear('foreach_star');
			if(empty($GLOBALS['config']['cache']['html_cache_on']) && empty($GLOBALS['config']['cache']['data_cache_star'])){
			    return false;
			}			
			$info=db('star')->field('star_id,star_cid,star_letters')->find($id);
			if($info['star_id']){
				if(!empty($GLOBALS['config']['cache']['html_cache_on'])){
			        $this->Delindex();
				    if(!empty($GLOBALS['config']['cache']['html_cache_star_list'])){
			            deldir(RUNTIME_PATH.'html/pc/show/'.getlistpid($info['star_cid']).'/');
				        deldir(RUNTIME_PATH.'html/pc/show/'.getlistname(getlistpid($info['star_cid']),'list_dir').'/');
				
			            deldir(RUNTIME_PATH.'html/mobile/show/'.getlistpid($info['star_cid']).'/');
				        deldir(RUNTIME_PATH.'html/mobile/show/'.getlistname(getlistpid($info['star_cid']),'list_dir').'/');	
                    }
                    if(!empty($GLOBALS['config']['cache']['html_cache_star_read'])){				
				        //删除PC端HTML缓存
				        deldir(RUNTIME_PATH.'html/pc/star/'.get_Key($info['star_id']).'/');
                        deldir(RUNTIME_PATH.'html/pc/star/'.get_Key($info['star_letters']).'/');					
				        //删除手机端HTML缓存
			            deldir(RUNTIME_PATH.'html/mobile/star/'.get_Key($info['star_id']).'/');
                        deldir(RUNTIME_PATH.'html/mobile/star/'.get_Key($info['star_letters']).'/');
				    }
                }
                if(!empty($GLOBALS['config']['cache']['data_cache_star'])){				
				    //删除内容缓存
                    Cache::rm('data_cache_star_'.$info['star_id']);
                    Cache::rm('data_cache_star_'.$info['star_letters']);
                }				
			}	
		}
		//节目表
        elseif($sid==7 || $sid=='tv'){
			Cache::clear('foreach_tv');
			if(empty($GLOBALS['config']['cache']['html_cache_on']) && empty($GLOBALS['config']['cache']['data_cache_tv'])){
			    return false;
			}			
			$info=db('tv')->field('tv_id,tv_cid,tv_letters')->find($id);
			if($info['tv_id']){
				if(!empty($GLOBALS['config']['cache']['html_cache_on'])){
			        $this->Delindex();
				    if(!empty($GLOBALS['config']['cache']['html_cache_tv_list'])){
			            deldir(RUNTIME_PATH.'html/pc/show/'.getlistpid($info['tv_cid']).'/');
				        deldir(RUNTIME_PATH.'html/pc/show/'.getlistname(getlistpid($info['tv_cid']),'list_dir').'/');
				
			            deldir(RUNTIME_PATH.'html/mobile/show/'.getlistpid($info['tv_cid']).'/');
				        deldir(RUNTIME_PATH.'html/mobile/show/'.getlistname(getlistpid($info['tv_cid']),'list_dir').'/');
                    }
                    if(!empty($GLOBALS['config']['cache']['html_cache_tv_read'])){				
				        //删除PC端HTML缓存
				        deldir(RUNTIME_PATH.'html/pc/tv/'.get_Key($info['tv_id']).'/');
                        deldir(RUNTIME_PATH.'html/pc/tv/'.get_Key($info['tv_letters']).'/');					
				        //删除手机端HTML缓存
			            deldir(RUNTIME_PATH.'html/mobile/tv/'.get_Key($info['tv_id']).'/');
                        deldir(RUNTIME_PATH.'html/mobile/tv/'.get_Key($info['tv_letters']).'/');
				    }
                }
                if(!empty($GLOBALS['config']['cache']['data_cache_tv'])){				
				    //删除内容缓存
                    Cache::rm('data_cache_tv_'.$info['tv_id']);
                    Cache::rm('data_cache_tv_'.$info['tv_letters']);
                }				
			}	
		}
		//专题
        elseif($sid==10 || $sid=='special'){
			Cache::clear('foreach_special');
			if(empty($GLOBALS['config']['cache']['html_cache_on']) && empty($GLOBALS['config']['cache']['data_cache_special'])){
			    return false;
			}				
			$info=db('special')->field('special_id,special_cid,special_letters')->find($id);
			if($info['special_id']){
				if(!empty($GLOBALS['config']['cache']['html_cache_on'])){
			        $this->Delindex();
				    if(!empty($GLOBALS['config']['cache']['html_cache_special_list'])){
			            deldir(RUNTIME_PATH.'html/pc/show/'.getlistpid($info['special_cid']).'/');
				        deldir(RUNTIME_PATH.'html/pc/show/'.getlistname(getlistpid($info['special_cid']),'list_dir').'/');
				
			            deldir(RUNTIME_PATH.'html/mobile/show/'.getlistpid($info['special_cid']).'/');
				        deldir(RUNTIME_PATH.'html/mobile/show/'.getlistname(getlistpid($info['special_cid']),'list_dir').'/');
                    }
                    if(!empty($GLOBALS['config']['cache']['html_cache_special_read'])){				
				        //删除PC端HTML缓存
				        deldir(RUNTIME_PATH.'html/pc/special/'.get_Key($info['special_id']).'/');
                        deldir(RUNTIME_PATH.'html/pc/special/'.get_Key($info['special_letters']).'/');					
				        //删除手机端HTML缓存
			            deldir(RUNTIME_PATH.'html/mobile/special/'.get_Key($info['special_id']).'/');
                        deldir(RUNTIME_PATH.'html/mobile/special/'.get_Key($info['special_letters']).'/');
                    }				
                }				
				//删除内容缓存
				if(!empty($GLOBALS['config']['cache']['data_cache_special'])){
                    Cache::rm('data_cache_special_'.$info['special_id']);
                    Cache::rm('data_cache_special_'.$info['special_letters']);
                }				
			}	
		}		
    }
    function Delindex(){
		if(!empty($GLOBALS['config']['cache']['html_cache_on'])){
			//删除首页
			if(!empty($GLOBALS['config']['cache']['html_cache_index'])){
			    @unlink(RUNTIME_PATH.'html/pc/index.'.$GLOBALS['config']['rewrite']['url_rewrite_suffix']);
			    @unlink(RUNTIME_PATH.'html/mobile/index.'.$GLOBALS['config']['rewrite']['url_rewrite_suffix']);	
			}
			//删除首页
			if(!empty($GLOBALS['config']['cache']['html_cache_my_list'])){
			    deldir(RUNTIME_PATH.'html/pc/my/');
				deldir(RUNTIME_PATH.'html/mobile/my/');
			}			
        }			

    }
}
?>